<?php

namespace Database\Factories\Article;

use Illuminate\Database\Eloquent\Factories\Factory;

//引入关联模型
use App\Models\Article\Article;

class ArticleFactory extends Factory
{
    //关联模型
    protected $model = Article::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            //添加测试数据的规则
            'title' => $this->faker->sentence(6, true), // 一句话
            'content' => $this->faker->text(500), //一段话 500个字符
            'thumb' => 'uploads/images/cover.jpg' //缩略图
        ];
    }
}
